
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<base href="<%=basePath%>" />
<%@ taglib prefix="s" uri="/struts-tags"%>
<title>Papers</title>
<table>
	<tr>
		<td width="100" align="center"><img src="img/paper.png" width="40" height="40" /></td>

		<td width="100" align="center"><img src="img/english.png" width="40" height="40" /></td>

		<td width="100" align="center"><img src="img/opinion.png" width="40" height="40" /></td>
<td><font style="font-size:30"><strong>My Paper Library</strong></font></td>
	</tr>
	<tr>
		<td width="100" align="center"><a href="listPaper.do"><font style="font-size:13">[papers]</font></a></td>
		<td width="100" align="center"><a href="listSentence.do"><font style="font-size:13">[sentences]</font></a></td>
		<td width="100" align="center"><a href="listOpinion.do"><font style="font-size:13">[opinions]</font></a></td>
		<td></td>
	</tr>
</table> 
<hr size=0 noshade color="#eeeeee">


<table>
	<tr>
		<td width="280"><font style="font-size: 12; font-family: verdana">Input
				a new sentence:</font><br>
			<form action="insertSentence.do">
				<table>
					<tr>
						<td>Type</td>
						<td><select name="sentenceTypeId">
								<s:iterator value="sentenceTypes">
									<option value="${id}">
										<s:property value="name" />
									</option>
								</s:iterator>
						</select></td>
					</tr>
					<tr>
						<td>key word</td>
						<td><input name="keyword" size="25"></td>
					</tr>
					<tr>
						<td>text</td>
						<td><textarea name="text" cols="21" rows="10"></textarea></td>
					</tr>
					<tr>
						<td><s:textfield name="paperId" style="display:none" /></td>
						<td><input type="submit" value="save"></td>
					</tr>
				</table>
			</form> <br> <font style="font-size: 12; font-family: verdana">Note:
				You can put sentence information into <br>your paper lab by
				fill in the above form.
		</font></td>
		<td>
		<p>
				<font style="color: red"><strong><s:property
							value="paperTitle" /></strong></font>
		
		<br/><font style="font-family: verdana; font-size: 12">Total
				Count:<font style="color: red"><s:property value="totalCount" /></font>
		</font>
			<hr size=0 noshade color="#eeeeee">
			<s:if test="sentences.size > 0">
				<s:iterator value="sentences">
					<font style="color:green">
					<strong>
					[<s:property value="sentenceType.name" />]
					</strong>
					</font>
					<s:property value="text" />
					<br/>
				</s:iterator>
			</s:if> <br> <font style="font-size: 12; font-family: verdana">
				<s:if test="curPage!=1">
					<a href="paperSentence.do?paperId=${paperId}&curPage=1&pageSize=${pageSize}">home</a>
				</s:if> <s:if test="curPage-3>0&&curPage<=totalPage">
					<a href="paperSentence.do?paperId=${paperId}&curPage=${curPage-3}&pageSize=${pageSize}"><s:property
							value="curPage-3" /></a>
				</s:if> <s:if test="curPage-2>0&&curPage<=totalPage">
					<a href="paperSentence.do?paperId=${paperId}&curPage=${curPage-2}&pageSize=${pageSize}"><s:property
							value="curPage-2" /></a>
				</s:if> <s:if test="curPage-1>0&&curPage<=totalPage">
					<a href="paperSentence.do?paperId=${paperId}&curPage=${curPage-1}&pageSize=${pageSize}"><s:property
							value="curPage-1" /></a>
				</s:if> <s:property value="curPage" /> <s:if
					test="curPage+1>0&&curPage+1<=totalPage">
					<a href="paperSentence.do?paperId=${paperId}&curPage=${curPage+1}&pageSize=${pageSize}"><s:property
							value="curPage+1" /></a>
				</s:if> <s:if test="curPage+2>0&&curPage+2<=totalPage">
					<a href="paperSentence.do?paperId=${paperId}&curPage=${curPage+2}&pageSize=${pageSize}"><s:property
							value="curPage+2" /></a>
				</s:if> <s:if test="curPage+3>0&&curPage+3<=totalPage">
					<a href="paperSentence.do?paperId=${paperId}&curPage=${curPage+3}&pageSize=${pageSize}"><s:property
							value="curPage+3" /></a>
				</s:if> <a href="paperSentence.do?paperId=${paperId}&curPage=${totalPage}&pageSize=${pageSize}">end</a>
				&nbsp;&nbsp;&nbsp;&nbsp;Total Pages: <s:property value="totalPage" />
		</font></td>
	</tr>
</table>







